<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



//前台首页
Route::get('/','Home\HomeController@index');
//前台登录
Route::get('/home/login','Home\LoginController@index');
Route::post('/home/login/dologin','Home\LoginController@dologin');

//退出登录
Route::get('home/login/logout','Home\HomeController@logout');

//忘记密码
Route::get('home/login/reset','Home\LoginController@reset');
Route::post('/home/login/doreset','Home\LoginController@doreset');
Route::post('/home/login/update','Home\LoginController@update');
Route::get('home/login/newPass/id/{id}/token/{token}','Home\LoginController@newPass');

//前台注册
Route::get('/home/zhuce','Home\ZhuceController@index');
Route::post('/home/zhuce/doreg','Home\ZhuceController@doreg');

//验证码
Route::get('kit/captcha/{tmp}', 'Home\KitController@captcha');


//收货地址
Route::group(['namespace'=>'Home','prefix'=>'home/user','middleware' => 'hlogin'], function(){

	Route::get('personcenter', 'UserController@personcenter');  	//显示个人中心
	Route::get('address', 'UserController@address');				//显示收货地址
	Route::post('doaddress', 'UserController@doaddress');			//添加收货地址
	Route::get('editaddress/{id}', 'UserController@editaddress');	//修改收货地址
	Route::post('saveaddress', 'UserController@saveaddress');		//改入数据库
	Route::get('deladdress/{id}', 'UserController@deladdress');		//删除收货地址


	Route::get('mylike', 'UserController@mylike');					// 显示喜欢商品	
	Route::get('delmylike/{id}', 'UserController@delmylike');			// 删除喜欢商品

});

//后台主页
// Route::get('/admin/index','Admin\IndexController@index');
//用户管理
//Route::get('/admin/user/add','Admin\UserController@add');
